/**
 * 
 */
package org.istt.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.istt.dao.TimeWeekendDao;
import org.istt.domain.TimeWeekend;
import org.istt.service.TimeWeekendManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Huy
 *
 */
@Service("timeWeekendManager")
public class TimeWeekendManagerImpl extends ManagerImpl<TimeWeekend, Long> implements TimeWeekendManager {
	
	/**
	 * @param WorkflowDao the WorkflowDao to set
	 */
	@Autowired
	public void setTimeWeekendDao(TimeWeekendDao dao) {
		this.dao = dao;
	}

	@Override
	public List<Integer> getWeekend() {
		List<Integer> result = new ArrayList<Integer>(); 
		
		List<TimeWeekend> lst = this.dao.findAll();
		if(lst!=null && lst.size()!=0){
			for (TimeWeekend timeWeekend : lst) {
				result.add(new Integer(timeWeekend.getDay_id()));
			}
		}
		return result;
	}
	

}
